<?php
class WorkUtility
{
    public static function getById($workId)
    {
        return WorkModel::model()->findByPk($workId);
    }

    public static function add($id, $name)
    {
        $work = new WorkModel();
        $work->id = $id;
        $work->name = $name;
        $work->save();

        return $work;
    }
}